home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
examples.arc
/
EXAMPL01.PRO
next >
Wrap
Text File
|
1986-10-07
|
1KB
|
37 lines
/* Program 1 */
/*
Enter the goal on page 18 of the manual.
Some valuable notes are at the bottom
of this program.
*/
domains
person, activity = symbol
predicates
likes(person,activity)
clauses
likes(ellen,tennis).
likes(john,football).
likes(tom,baseball).
likes(eric,swimming).
likes(mark,tennis).
likes(bill,X_var) if likes(tom,X_var).
/* Note that the first letter of a variable is
capitalized.
Turbo Prolog returns NO SOLUTION when an
attempt to bind a variable fails. Prolog
searches for all bindings which satisfy the
goal. Each set of bindings that satisfies the
goal constitutes a solution. If there are no
variables, Turbo Prolog does not search for
all solutions, it looks for the first fact or
rule which matches the goal, and thereby
proves it true. Turbo Prolog returns TRUE if
there is a fact or rule that matches. If no
match is found, the fact cannot be proven and
Turbo Prolog returns FALSE.
*/